package com.traffic.service.impl;

import com.traffic.domain.FamilyAbroad;
import com.traffic.mapper.FamilyAbroadMapper;
import com.traffic.service.IFamilyAbroadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 亲属出国信息Service业务层处理
 * 
 * @author zzs
 * @date 2024-11-11
 */
@Service
public class FamilyAbroadServiceImpl implements IFamilyAbroadService 
{
    @Autowired
    private FamilyAbroadMapper familyAbroadMapper;

    /**
     * 查询亲属出国信息
     * 
     * @param id 亲属出国信息主键
     * @return 亲属出国信息
     */
    @Override
    public FamilyAbroad selectFamilyAbroadById(String id)
    {
        return familyAbroadMapper.selectFamilyAbroadById(id);
    }

    /**
     * 查询亲属出国信息列表
     * 
     * @param familyAbroad 亲属出国信息
     * @return 亲属出国信息
     */
    @Override
    public List<FamilyAbroad> selectFamilyAbroadList(FamilyAbroad familyAbroad)
    {
        return familyAbroadMapper.selectFamilyAbroadList(familyAbroad);
    }

    /**
     * 新增亲属出国信息
     * 
     * @param familyAbroad 亲属出国信息
     * @return 结果
     */
    @Override
    public int insertFamilyAbroad(FamilyAbroad familyAbroad)
    {
        return familyAbroadMapper.insertFamilyAbroad(familyAbroad);
    }

    /**
     * 修改亲属出国信息
     * 
     * @param familyAbroad 亲属出国信息
     * @return 结果
     */
    @Override
    public int updateFamilyAbroad(FamilyAbroad familyAbroad)
    {
        return familyAbroadMapper.updateFamilyAbroad(familyAbroad);
    }

    /**
     * 批量删除亲属出国信息
     * 
     * @param ids 需要删除的亲属出国信息主键
     * @return 结果
     */
    @Override
    public int deleteFamilyAbroadByIds(String[] ids)
    {
        return familyAbroadMapper.deleteFamilyAbroadByIds(ids);
    }

    /**
     * 删除亲属出国信息信息
     * 
     * @param id 亲属出国信息主键
     * @return 结果
     */
    @Override
    public int deleteFamilyAbroadById(String id)
    {
        return familyAbroadMapper.deleteFamilyAbroadById(id);
    }
}
